//
//
//
#include <iostream>
#include "CBulletPhysics.h"

using std::cout;

bool	CBulletPhysics::Init()
{
	m_pDefaultCollisionConfiguration = new btDefaultCollisionConfiguration;

	m_pDispatcher = new btCollisionDispatcher(m_pDefaultCollisionConfiguration);

	m_pOverlappingPairCache = new btDbvtBroadphase();

	m_pSolver = new btSequentialImpulseConstraintSolver();

	m_pDynamicsWorld = new btDiscreteDynamicsWorld(m_pDispatcher, m_pOverlappingPairCache, m_pSolver,
		m_pDefaultCollisionConfiguration );

	m_pDynamicsWorld->setGravity(btVector3(0, 0, -9.8f));

	cout << "Bullet physics initializing finished.\n";

	return true;
}